#include "selectpdfform.h"
#include "ui_selectpdfform.h"

SelectPdfForm::SelectPdfForm(const int id, QWidget *parent) :
    QWidget(parent),
    ui(new Ui::SelectPdfForm)
{
    id_=id;
    ui->setupUi(this);
}

SelectPdfForm::~SelectPdfForm()
{
    delete ui;
}
void SelectPdfForm::SetFileName(const QString& fileName)
{
    fileName_=fileName;
    ui->label_pdf_name->setText(fileName_);
    ui->checkBox->setChecked(true);
    update();
}


bool SelectPdfForm::isChecked()
{
    return ui->checkBox->isChecked();
}

void SelectPdfForm::on_pushButton_clear_clicked()
{
    emit sig_clearRecord(id_);
}

void SelectPdfForm::slot_changeState(int id,QString state)
{
    if(id_!=id)
        return;

    ui->label_state->setText(state);
}
